package com.ylink.epcc.epccdemocustomization.service;

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ylink.epcc.common.db.epcc209.entity.Epcc209DO;
import com.ylink.epcc.common.db.epcc209.repository.Epcc209Repository;

@Service
@Transactional
public class EpccDemoCustomizationService implements EpccDemoCustomizationIService {
	@Resource
	private Epcc209Repository epcc209Repository;

	@Override
	public void insert(Epcc209DO epcc209do) {
		epcc209Repository.insert(epcc209do);
	}


	@Override
	public void update(Epcc209DO model) {
		// TODO Auto-generated method stub
		epcc209Repository.update(model);
	}


	@Override
	public Boolean isDuplicate(Map<String, Object> map) {
		 Integer count = epcc209Repository.countByPK(map);
	        if (count == 0) {
	            return false;
	        }
	        return true;
	}

}
